package com.mineoj.service;

import com.mineoj.model.dto.competitionquestion.CompetitionQuestionAddRequest;
import com.mineoj.model.entity.CompetitionQuestion;
import com.baomidou.mybatisplus.extension.service.IService;
import com.mineoj.model.entity.User;

/**
* @author 明月
* @description 针对表【competition_question(比赛题目)】的数据库操作Service
* @createDate 2025-04-20 18:59:17
*/
public interface CompetitionQuestionService extends IService<CompetitionQuestion> {
    /**
     * 校验题目能不能添加到比赛
     * @param competitionQuestionAddRequest
     * @return
     */
    boolean validCompetitionQuestion(CompetitionQuestionAddRequest competitionQuestionAddRequest);

    /**
     * 添加题目到比赛
     *
     */
    int addCompetitionQuestion(CompetitionQuestionAddRequest competitionQuestionAddRequest, User loginUser);

    /**
     * 添加题目到比赛（内部服务）
     *
     * @param userId
     * @param competitionQuestionAddRequest
     * @param add
     * @return
     */
    int addCompetitionQuestionInner(long userId, CompetitionQuestionAddRequest competitionQuestionAddRequest, boolean add);

}
